import 'package:flutter/material.dart';
import 'package:flutter_changdian_football/pages/mine/user_store.dart';
import 'package:flutter_changdian_football/routers/app_routes.dart';
import 'package:flutter_changdian_football/widget/screenutil/custom_screenutil.dart';
import 'package:get/get.dart';

class ClubEmpty extends StatelessWidget {
  const ClubEmpty({super.key});

  @override
  Widget build(BuildContext context) {
    return SizedBox(
      width: double.infinity,
      height: double.infinity,
      child: Column(
        mainAxisAlignment: MainAxisAlignment.end,
        children: [
          SizedBox(
            child: Image.asset('assets/images/img_kzt_01.png'),
          ),

          Container(
            padding: EdgeInsets.symmetric(horizontal: 75.w),
            alignment: Alignment.center,
            child: Text('您暂未加入俱乐部，请先加入俱乐部或创建一个自己的俱乐部吧！', style: TextStyle(fontSize: 14.sp, color: const Color(0xffCCCCCC)), textAlign: TextAlign.center,),
          ),

          SizedBox(height: 103.w,),

          Container(
            padding: EdgeInsets.symmetric(horizontal: 17.w),
            child: GestureDetector(
              behavior: HitTestBehavior.translucent,
              onTap: () {
                if (UserStore.to.checkLoginPage()) {
                  Get.toNamed(AppRoutes.createClub);
                }
              },
              child: Container(
                padding: EdgeInsets.symmetric(vertical: 12.w),
                decoration: BoxDecoration(
                  border: Border.all(
                    width: 0.5.w,
                    color: const Color(0xff499360)
                  ),
                  borderRadius: BorderRadius.circular(8.r)
                ),
                alignment: Alignment.center,
                width: double.infinity,
                child: Text('创建', style: TextStyle(fontSize: 16.sp, fontWeight: FontWeight.w500, color: const Color(0xff499360)),),
              ),
            ),
          ),

          SizedBox(height: 16.w,),


          Container(
            padding: EdgeInsets.symmetric(horizontal: 17.w),
            child: GestureDetector(
              behavior: HitTestBehavior.translucent,
              onTap: () {
                if (UserStore.to.checkLoginPage()) {
                  Get.toNamed(AppRoutes.clubRanking);
                }
              },
              child: Container(
                padding: EdgeInsets.symmetric(vertical: 12.w),
                decoration: BoxDecoration(
                  border: Border.all(
                    width: 0.5.w,
                    color: const Color(0xff499360)
                  ),
                  borderRadius: BorderRadius.circular(8.r),
                  gradient: const LinearGradient(
                    begin: Alignment(-0.098, 0.98),
                    end: Alignment(0.995, -1),
                    colors: [
                      Color.fromRGBO(73, 147, 96, 1),
                      Color.fromRGBO(41, 86, 81, 1),
                    ],
                  ),
                ),
                alignment: Alignment.center,
                width: double.infinity,
                child: Text('加入', style: TextStyle(fontSize: 16.sp, fontWeight: FontWeight.w500, color: Colors.white),),
              ),
            ),
          ),

          SizedBox(height: 10.w,),

          SizedBox(
            child: Text('*您只能创建和管理一只球队，加入最多三支球队哦！', style: TextStyle(fontSize: 12.sp, color: const Color(0xffF4333C), fontWeight: FontWeight.w300),),
          ),

          SizedBox(height: 50.w,)
        ],
      ),
    );
  }
}